FINERACT-2647: Decouple client module#6110
Open
mansi75 wants to merge 2 commits into
Open
Conversation
Contributor
|
@mansi75 Please rebase |
There was a problem hiding this comment.
Pull request overview
This PR enforces Spring Modulith feature boundaries for the Client feature by replacing cross-feature implementation dependencies with core-level read/write contracts (interfaces) and minimal DTO projections, and by adding an automated boundary test to prevent regressions.
Changes:
- Introduces multiple
Client*read/write contracts and minimal DTOs infineract-core, implemented by the respective feature modules. - Refactors client-facing provider services/resources to depend on these contracts (instead of other feature-domain types).
- Adds a Spring Modulith boundary test and updates Gradle dependencies / test JVM settings to support the new architecture checks.
Reviewed changes
Copilot reviewed 44 out of 77 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsReadServiceImpl.java | Implements core client savings read-contract in savings module |
| fineract-savings/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsActivationServiceImpl.java | Implements core client savings activation contract in savings module |
| fineract-provider/src/test/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImplTest.java | Updates mocks to use new collateral read-contract |
| fineract-provider/src/test/java/org/apache/fineract/portfolio/client/ClientCrossFeatureBoundaryTest.java | Adds Modulith boundary regression test for Client module |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java | Implements client savings product lookup contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java | Implements client savings account lookup contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformServiceJpaRepositoryImpl.java | Implements client note cleanup contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformServiceImpl.java | Implements client obligee read-contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralReadServiceImpl.java | Implements core collateral read-contract in collateral module |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java | Refactors client lifecycle operations behind core contracts |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformServiceJpaRepositoryImpl.java | Refactors accounting/charge dependencies behind core contracts |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformServiceImpl.java | Uses client lookup contracts for template generation |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java | Moves collateral mapping behind collateral read-contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeWritePlatformServiceImpl.java | Uses charge read-contract and client journal-entry contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/package-info.java | Declares Client as a Modulith application module |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java | Changes accounting bridge mapping to use charge projections |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepositoryWrapper.java | Uses charge read-contract for currency enrichment |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientCharge.java | Decouples from Charge entity by persisting chargeId |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java | Switches to client-facing lookup/account-summary contracts |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java | Uses client-applicable charge lookup contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResource.java | Depends on address read-service interface (not impl) |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformServiceImpl.java | Implements client-applicable charge lookup contract |
| fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java | Implements client account-summary JSON contract |
| fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadService.java | Extracts client-only datatable template contract |
| fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformService.java | Extracts client journal-entry posting contract |
| fineract-provider/dependencies.gradle | Adds Spring Modulith dependencies / version |
| fineract-provider/build.gradle | Adjusts provider test JVM memory settings |
| fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ClientLoanReadServiceImpl.java | Implements core loan-status projection read-contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsReadService.java | Adds client savings read-contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsProductLookupReadService.java | Adds client savings product lookup contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsActivationService.java | Adds client savings activation contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/ClientSavingsAccountLookupReadService.java | Adds client savings account lookup contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/ClientNoteWriteService.java | Adds client note cleanup contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ClientLoanReadService.java | Adds loan-status projection read-contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/ClientObligeeReadService.java | Adds obligee lookup read-contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/ObligeeData.java | Adds obligee DTO in core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotFoundException.java | Moves/introduces group exception into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberCountNotInPermissibleRangeException.java | Moves/introduces group exception into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepository.java | Introduces/moves group repository into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralReadService.java | Adds collateral DTO read-contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddress.java | Introduces client-address entity in core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientLoanStatusData.java | Adds minimal loan-status DTO for client-close checks |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/service/ClientChargeReadService.java | Adds charge-definition projection contract for client |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/service/ClientApplicableChargeReadService.java | Adds “charges applicable to clients” lookup contract |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeEnumerations.java | Adds/moves charge enumeration mapping helpers into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeNotFoundException.java | Adds/moves charge not-found exception into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeAppliedToException.java | Adds/moves charge applicability exception into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargePaymentMode.java | Adds/moves charge payment mode enum into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeCalculationType.java | Adds/moves charge calculation enum into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeAppliesTo.java | Adds/moves charge applies-to enum into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/charge/data/ClientChargeDefinitionData.java | Adds minimal charge-definition DTO for client feature |
| fineract-core/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformService.java | Introduces address write-service interface into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformService.java | Introduces address read-service interface into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/address/filter/ClientAddressSearchParam.java | Introduces client address search filter DTO |
| fineract-core/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java | Introduces/moves address entity into core |
| fineract-core/src/main/java/org/apache/fineract/portfolio/address/data/ClientAddressData.java | Introduces client address DTO |
| fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/service/ClientAccountSummaryReadService.java | Adds client account summary JSON contract |
| fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/exception/WorkingDaysNotFoundException.java | Introduces/moves working-days exception into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java | Introduces/moves working-days wrapper into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepository.java | Introduces/moves working-days repository into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadPlatformService.java | Introduces/moves staff read service interface into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java | Introduces/moves staff repository wrapper into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepository.java | Introduces/moves staff repository into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayNotFoundException.java | Introduces/moves holiday exception into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java | Introduces/moves holiday wrapper into core |
| fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepository.java | Introduces/moves holiday repository into core |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientRejectBusinessEvent.java | Introduces client reject business event in core |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientCreateBusinessEvent.java | Introduces client create business event in core |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientBusinessEvent.java | Introduces client business event base class |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientActivateBusinessEvent.java | Introduces client activate business event in core |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformService.java | Introduces/moves datatable checks write service interface |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ClientDatatableChecksReadService.java | Adds client-only datatable templates contract |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/exception/AccountNumberFormatNotFoundException.java | Introduces/moves account number format exception |
| fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepositoryWrapper.java | Introduces/moves account number format wrapper |
| fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/service/ClientJournalEntryWriteService.java | Adds client journal-entry posting contract |
| fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ClientChargeReadServiceImpl.java | Implements charge-definition projection contract in charge module |
| build.gradle | Adjusts CycloneDX task configuration for all projects |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@adamsaghy Sure |
582daaf to
58a0144
Compare
58a0144 to
48aa4a5
Compare
…a Spring Modulith boundary test
48aa4a5 to
ece0814
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses FINERACT-2647 by decoupling the client module from cross-feature dependencies.
The client code previously depended directly on classes from other feature packages/modules. This change introduces and moves the required client-facing contracts and shared types into
fineract-core, so the client module can interact through core-level abstractions instead of depending directly on unrelated feature implementations.The client module is now aligned to depend only on allowed shared modules such as
fineract-coreandfineract-command. Implementations in other feature areas, including loan, savings, charge, collateral, note, accounting, staff, working days, holidays, and data queries, have been updated to use the new boundaries.This helps improve module boundaries and supports the ongoing Fineract modularization effort by reducing cross-feature coupling for the client package/module. FINERACT-2647 is listed as a sub-task for decoupling the client package/module from third-party domains.
A Spring Modulith boundary test has also been added to verify that the client package does not regress and introduce direct cross-feature dependencies again.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!